package com.weirong.smartvault.backservice.util.chart;

import java.util.ArrayList;
import java.util.List;

/**
 * 于2017/12/18由 KFEB4 创建 .
 * 图表的Option，用于简化交互的json数据处理
 *     var option = {

 tooltip : {
 trigger: 'axis'
 },

 toolbox: {
 show : true,
 feature : {
 mark : {show: true},
 dataView : {show: true, readOnly: false},
 magicType : {show: true, type: ['line', 'bar']},
 restore : {show: true},
 saveAsImage : {show: true}
 }
 },
 calculable : true,

 yAxis : [
 {
 type : 'value'
 }
 ],

 };
 */
public class ChartOption {

    class Title{
        public String text;
        public String subtext;
    }
    public  Title title = new Title();

    class Legend{
        public List<String> data = new ArrayList<>();
    }
    public  Legend legend = new Legend();

    static class Series{
        String name;
        String type;
        List<Float> data = new ArrayList<>();
        String stack;
        static class MakePoint{
            static class Type{
                String type;
                String name;
            }
            List<Type> data = new ArrayList<>();
        }
        MakePoint makePoint = new MakePoint();
        static class MakeLine{
            static class Type{
                String type;
                String name;
            }
            List<Type> data = new ArrayList<>();
        }
        MakeLine makeLine = new MakeLine();

    }
    public  List<Series> series = new ArrayList<>();

    /*
    xAxis : [
    {
        type: 'category',
                data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
    }
    ],*/
    static class XAxis{
        String type;
        List<String> data = new ArrayList<>();
    }
    public List<XAxis> xAxis = new ArrayList<>();
}
